Skip to main content

Component testing - Gauge chart test plan

Snapshot testing

Test caseValidationTool used
When only segments and chartValue props are setShould render gauge chart correctlyEnzyme
When hideMinMax prop is set to trueShould not render the min and max values of the gaugeEnzyme
When chartTitle prop is setShould render the chart title correctlyEnzyme
When sublabel prop is setShould render the sublabel correctlyEnzyme
When the layout direction is RTLShould render gauge chart correctlyEnzyme
When hideLegend prop is set to trueShould not render the legendsEnzyme
When chartValueFormat is set to ‘fraction’Should render the chart value in fraction formatEnzyme
When a segment has no colorShould render a color from DataVizPalette for the segmentEnzyme
When the total size of the segments is less than the difference between maxValue and minValue propsShould render a placeholder segmentEnzyme
When the theme is darkShould render gauge chart correctlyEnzyme

Testing event listeners

Test caseValidationTool used
When the mouse moves over a segment and then leaves the chartShould show a callout and hide it respectivelyRTL
When a segment is focused and then blurredShould show an outline around the segment and hide it respectivelyRTL
When the mouse moves over the chart value and then leaves the chartShould show a callout and hide it respectivelyRTL
When the mouse moves over the needle and then leaves the chartShould show a callout and hide it respectivelyRTL
When the needle is focused and then blurredShould show a callout and hide it respectivelyRTL
When the mouse moves over a legend and then moves out of the legendShould highlight the corresponding segment and unhighlight it respectivelyRTL
When a legend is clicked once and then clicked againShould highlight the corresponding segment and unhighlight it respectivelyRTL
When the length of the chart value exceeds the max widthShould truncate the chart value with ellipsisRTL
When the chart resizesShould update the font size of the chart valueRTL
When hideTooltip prop is set to trueShould not show a calloutRTL